"use strict";
import * as React from 'react';
import { SCREEN_WIDTH } from "../constant";
import { autoSize, commonStyles } from "../assets/styles/common";
import MyText from "./MyText";
import Colors from "../assets/styles/Colors";
const { View, ART } = require('react-native');
const { Surface, Group, Shape, Path } = ART;
const { connect } = require('react-redux');
class AuthHeader extends React.Component {
    render() {
        const path = Path(`M0 0 H${SCREEN_WIDTH} V${autoSize(180)} C${autoSize(210.25)} ${autoSize(120)} ${autoSize(93.75)} ${autoSize(220)} 0 ${autoSize(180)}`).close();
        return (<View style={[commonStyles.centerVH, commonStyles.relative]}>
                <Surface width={SCREEN_WIDTH} height={autoSize(227)}>
                    <Group>
                        <Shape d={path} stroke="#fff" strokeWidth={0} fill={Colors.Primary}/>
                    </Group>
                </Surface>
                <MyText style={[commonStyles.absolute, { backgroundColor: 'transparent' }]} color={'#fff'} fontSize={30}>{this.props.text}</MyText>
            </View>);
    }
}
AuthHeader.defaultProps = {
    text: '轻生活'
};
export default AuthHeader;
